<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .big {
            background-color: red;
            height: 100px;
            width: 100px;
            overflow: hidden;
            /* position: absolute; */
            margin-left: 50px;
        }
        
        .small {
            background-color: purple;
            height: 50px;
            width: 50px;
            position: absolute;
            top: 20px;
            left: 40px;
        }
    </style>
</head>

<body>
    <div class="big">
        <div class="small"></div>
    </div>
</body>
<script>
    var small = document.querySelector('.small');
    var big = small.parentNode;
    small.addEventListener('mouseenter', function() {
        console.log("-----small----");
    })
    big.addEventListener('mouseenter', function() {
        console.log("-----big----");
    })
</script>

</html>